package com.huiben.app.cartoonbooks.base;

import android.os.Bundle;
import android.support.annotation.Nullable;

import com.linewow.xhyy.basiclibrary.base.BaseModel;
import com.linewow.xhyy.basiclibrary.base.BasePresenter;
import com.linewow.xhyy.basiclibrary.base.SuperBaseCompatActivity;
import com.linewow.xhyy.basiclibrary.util.TUtil;

/**
 * Created by liuran on 2017/4/26.
 */

public abstract class BaseCompatActivity <P extends BasePresenter,M extends BaseModel> extends SuperBaseCompatActivity{

    protected P presenter;
    protected M model;



    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        presenter= TUtil.getT(this,0);
        model=TUtil.getT(this,1);
        if(presenter!=null){

            presenter.context=context;
        }
        initPresenter();
    }
    protected abstract void initPresenter();
}
